package com.pureut.storage.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.storage.domain.PickingOutsource;
import com.pureut.storage.dto.*;
import com.pureut.storage.export.PickingOutsourceExport;
import com.pureut.storage.vo.OrderReviewVo;
import com.pureut.storage.vo.PickingOutsourceVo;
import com.pureut.storage.vo.PickingRestDbVo;
import com.pureut.storage.vo.UpdateDocVo;
import com.pureut.system.api.vo.PickingOutsourceFeignVo;
import com.pureut.system.api.vo.SubcontractReceiptOtherVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author: CM
 * @date: 2022/12/28    11:00
 */
public interface PickingOutsourceService extends IService<PickingOutsource> {

    /**
     * 委外发货新增
     * @param pickingOutsourceVo
     * @return
     */
    boolean addOutsource(PickingOutsourceVo pickingOutsourceVo) throws Exception;


    /**
     * 委外发货修改
     * @param pickingOutsourceVo
     * @return
     */
    boolean updateOutsource(PickingOutsourceVo pickingOutsourceVo);

    /**
     * 委外发货关结
     * @param pickingOutsourceVo
     * @return
     */
    boolean closeOutsource(PickingOutsourceVo pickingOutsourceVo);

    /**
     * 委外发货删除
     * @param ids
     * @return
     */
    boolean deleteOutsource(String ids);

    /**
     * 提交审核
     * @param ids
     * @return
     */
    boolean submitOutsource(String ids);

    /**
     * 查看单据
     * @param id
     * @return
     */
    PickingOutsourceDto view(Long id);

    /**
     * 查看委外出库列表
     * @param pickingOutsourceVo
     * @return
     */
    List<PickingOutsourceDto> getList(PickingOutsourceVo pickingOutsourceVo);

    /**
     * 查看委外出库列表
     * @param pickingOutsourceVo
     * @return
     */
    List<GetPdaDto> getListPda(PickingOutsourceVo pickingOutsourceVo);


    /**
     * 导出
     * @param pickingOutsourceVo
     * @return
     */
    List<PickingOutsourceExport> getInfoExport(PickingOutsourceVo pickingOutsourceVo);

    /**
     * 委外发货出库
     * @param pickingRestDbVo
     * @return
     */
    PickingRestDbDto out(PickingRestDbVo pickingRestDbVo) throws Exception;

    /**
     * 拣货完成
     * @param id
     * @return
     */
    boolean finishProduction(Long id) throws Exception;

    /**
     * 拣货撤销
     * @param id
     * @return
     */
    boolean repealProduction(Long id);

    /**
     * 交接
     * @param pickingRestDbVo
     * @return
     */
    PickingRestHandoverDto overProduction(PickingRestDbVo pickingRestDbVo);

    /**
     * 审核
     * @param orderReviewVo
     * @return
     */
    boolean pickOutSourceReview(OrderReviewVo orderReviewVo);

    /**
     * 品质检验单修改出库状态
     * @param updateDocVo
     * @return
     */
    boolean outSourceUpdateStatus(UpdateDocVo updateDocVo);

    /***
     * 拣货方案
     * @param id
     * @return
     */
    SchemeDto point(Long id);

    /**
     * 新增（委外订单fegin调用）
     */
    boolean addPickingOutsource(SubcontractReceiptOtherVo subcontractReceiptOtherVo);

    /**
     * 关结委外发货单(fegin调用)
     */
    boolean closeOutsourceFeign(@RequestBody PickingOutsourceFeignVo pickingOutsourceFeignVo);
}
